package com.jinzheng.qhnetty.util.testjinzhengclient;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.socket.SocketChannel;

public class CheckClientInitializer1 extends ChannelInitializer<SocketChannel> {

    @Override
    protected void initChannel(SocketChannel socketChannel) throws Exception {
//        socketChannel.pipeline().addLast(new IdleStateHandler(120, 0, 0, TimeUnit.SECONDS));
        socketChannel.pipeline().addLast(new ByteArrayDecoder());
        socketChannel.pipeline().addLast(new ByteArrayEncoder());
        //登录校验
        socketChannel.pipeline().addLast(new NettyServer.NettyServerHandler());
    }
}